package ink.xiaobaibai.bo;

import lombok.Data;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;

/**
 * @description: 添加用户对象
 * @author: 小白白
 * @create: 2021-05-17
 **/

@Data
public class AddUserDistributor {

    @Length(max = 15, message = "名字最长15位")
    @NotNull(message = "数据不可为空")
    private String userName;

    @Length(max = 15, message = "账号最长15位")
    @NotNull(message = "数据不可为空")
    private String userNumber;

    @Pattern(regexp = "^(1[3-9]\\d{9}$)", message = "请输入正确的手机号")
    @NotNull(message = "数据不可为空")
    private String phone;

    /**
     * 一般都是初始密码 123456
     */
    @Length(min = 8, max = 20, message = "密码最短8位,最长20位")
    @NotNull(message = "数据不可为空")
    private String password;

}
